import { createStore } from 'vuex'

export default createStore({
  state: {
    // 当前菜单
    currentMenu: null,
  },
  mutations: {
    selectMenu(state, val) {
      // 如果点击的是首页 要把除（写死的）首页以外的面包屑去除
      val.index == '/noticeboard' ? (state.currentMenu = null) : (state.currentMenu = val)
    }
  },
  actions: {
  },
  modules: {
  }
})
